<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>模板字符串</title>
  <script>
    /**
     * 1. 模板字符串
     */
    function  fun1(){
      // 1.1 原样显示
      let info = `
            <h1>欢迎学习ES6</h1>
            <ul>
                <li>语文</li>
                <li>数学</li>
                <li>英语</li>
            </ul>
      `
      console.log(info)

      // 1.2 替换变量的值
      let page = 1
      let pageSize = 5
      let url = `/student/findByPage/${page}/${pageSize}`
      let name = "小明"
      let addr = '上海'
      let studInfo = `你叫${name},住在${addr}`
      console.log(studInfo)
      console.log(url);
    }
    fun1()
  </script>
</head>
<body>

</body>
</html>
